/**
  ****************************(C) COPYRIGHT 2019 DJI****************************
  * @file       can_receive.c/h
  * @brief      there is CAN interrupt function  to receive motor data,
  *             and CAN send function to send motor current to control motor.
  *             这里是CAN中断接收函数，接收电机数据,CAN发送函数发送电机电流控制电机.
  * @note       
  * @history
  *  Version    Date            Author          Modification
  *  V1.0.0     Dec-26-2018     RM              1. done
  *  V1.1.0     Nov-11-2019     RM              1. support hal lib
  *
  @verbatim
  ==============================================================================

  ==============================================================================
  @endverbatim
  ****************************(C) COPYRIGHT 2019 DJI****************************
  */

#ifndef CAN_RECEIVE_H
#define CAN_RECEIVE_H

#include "struct_typedef.h"

/* CAN send and receive ID */
typedef enum {
    BIG_ARM_ID = 0x401,
    SMALL_ARM_ID = 0x402,
} can_msg_id_e;

#define C_BOARD_MAIN_ID 0x300
#define C_BOARD_BIG_ARM_ID 0x301
#define C_BOARD_SMALL_ARM_ID 0x302
#define C_BOARD_3_ID 0x303
#define C_BOARD_4_ID 0x304

#define SELF_C_BOARD C_BOARD_MAIN_ID

typedef struct __PostureInfo{
    float yaw;
    float big_arm_pitch;
    float small_arm_pitch;
    float small_arm_roll;
} PostureInfo_t;

extern void CanSendData(can_msg_id_e std_id, float data1, float data2);

extern PostureInfo_t * GetPostureInfoPoint(void);

#endif
